package com.haiya.identityaccess.domain.identity.repository;

import com.haiya.identityaccess.domain.identity.model.Tenant;
import com.haiya.identityaccess.domain.identity.model.TenantId;

/**
 * @author qiaoguoqiang
 */
public interface TenantRepository {
    /**
     * 添加租户
     * @param aTenant
     */
    public void add(Tenant aTenant);

    /**
     * 获取租户ID
     * @return
     */
    public TenantId nextIdentity();

    /**
     * 删除租户
     * @param aTenant
     */
    public void remove(Tenant aTenant);

    /**
     * 查询给定名称的租户
     * @param aName
     * @return
     */
    public Tenant tenantNamed(String aName);

    /**
     * 查找给定租户ID的租户
     * @param aTenantId
     * @return
     */
    public Tenant tenantOfId(TenantId aTenantId);
}
